package com.ntes.consumer3.service;

import com.ntes.consumer3.service.impl.DemoServiceFallBack;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by bjliuyue1 on 2017/5/19.
 */
//指定服务名 name或者value 推荐使用name
@FeignClient(name = "service-demo", fallback = DemoServiceFallBack.class)
public interface IDemoService {

    @RequestMapping(value = "/getString", method = RequestMethod.GET)
    String getString(@RequestParam("name") String name);
}
